package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HospitalSubscribeContentMapper;
import com.ruoyi.system.domain.HospitalSubscribeContent;
import com.ruoyi.system.service.IHospitalSubscribeContentService;

/**
 * 内容Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-24
 */
@Service
public class HospitalSubscribeContentServiceImpl implements IHospitalSubscribeContentService 
{
    @Autowired
    private HospitalSubscribeContentMapper hospitalSubscribeContentMapper;

    /**
     * 查询内容
     * 
     * @param id 内容主键
     * @return 内容
     */
    @Override
    public HospitalSubscribeContent selectHospitalSubscribeContentById(Long id)
    {
        return hospitalSubscribeContentMapper.selectHospitalSubscribeContentById(id);
    }

    /**
     * 查询内容列表
     * 
     * @param hospitalSubscribeContent 内容
     * @return 内容
     */
    @Override
    public List<HospitalSubscribeContent> selectHospitalSubscribeContentList(HospitalSubscribeContent hospitalSubscribeContent)
    {
        return hospitalSubscribeContentMapper.selectHospitalSubscribeContentList(hospitalSubscribeContent);
    }

    /**
     * 新增内容
     * 
     * @param hospitalSubscribeContent 内容
     * @return 结果
     */
    @Override
    public int insertHospitalSubscribeContent(HospitalSubscribeContent hospitalSubscribeContent)
    {
        hospitalSubscribeContent.setCreateTime(DateUtils.getNowDate());
        return hospitalSubscribeContentMapper.insertHospitalSubscribeContent(hospitalSubscribeContent);
    }

    /**
     * 修改内容
     * 
     * @param hospitalSubscribeContent 内容
     * @return 结果
     */
    @Override
    public int updateHospitalSubscribeContent(HospitalSubscribeContent hospitalSubscribeContent)
    {
        hospitalSubscribeContent.setUpdateTime(DateUtils.getNowDate());
        return hospitalSubscribeContentMapper.updateHospitalSubscribeContent(hospitalSubscribeContent);
    }

    /**
     * 批量删除内容
     * 
     * @param ids 需要删除的内容主键
     * @return 结果
     */
    @Override
    public int deleteHospitalSubscribeContentByIds(Long[] ids)
    {
        return hospitalSubscribeContentMapper.deleteHospitalSubscribeContentByIds(ids);
    }

    /**
     * 删除内容信息
     * 
     * @param id 内容主键
     * @return 结果
     */
    @Override
    public int deleteHospitalSubscribeContentById(Long id)
    {
        return hospitalSubscribeContentMapper.deleteHospitalSubscribeContentById(id);
    }
}
